export default [
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/login'
      },
      {
        name: 'ChangePassword',
        path: '/user/ChangePassword',
        component: './user/ChangePassword'
      },
      {
        name: 'PasswordStatuspage',
        path: '/user/PasswordStatuspage',
        component: './user/PasswordStatuspage'
      },
      {
        component: './404'
      }
    ]
  },
  {
    path: '/',
    component: '../layouts/SecurityLayout',

    routes: [
      {
        path: '/',
        component: '../layouts/BasicLayout',
        // authority: ['admin', 'user'],
        routes: [
          {
            path: '/',
            redirect: '/Home'
          },
          {
            path: '/Home',
            name: 'Home',

            icon: 'bank',
            component: './Home'
          },
          //模板管理
          {
            path: '/template',
            name: 'template',
            icon: 'tool',
            authority: ['模板管理'], 
            routes: [
              {
                path: '/template/list',
                name: 'list',
                component: './Template/List/index',
                authority: ['模板列表']
              },
              // {
              //   path: '/template/list',
              //   name: 'list',
              //   component: './Template/List',
              //   authority: ['模板列表']
              // },
              {
                path: '/template/list/detail/:id?',
                name: 'detail',
                component: './Template/Detail/index',
                hideInMenu: true
              },
            ]
          },
          // 商品管理
          {
            path: '/goods',
            name: 'goods',
            icon: 'appstore',
            authority: ['商品审核'],
            routes: [
              {
                path: '/goods/index',
                name: 'index',
                component: './Goods'
                // newTab: true,
              },
              {
                path: '/goods/index/goodsDetail/:id/:actionId',
                name: 'goodsDetail',
                component: './Goods/goodsDetail',
                hideInMenu: true
              },
              {
                path: '/goods/Purchase',
                name: 'Purchase',
                component: './Goods/Purchase'
                // newTab: true,
              },
              {
                path: '/goods/Purchase/goodsDetail/:id/:actionId',
                name: 'PurchaseGoodsDetail',
                component: './Goods/Purchase/goodsDetail',
                hideInMenu: true
              }
            ]
          },
          {
            path: '/StoreAudit',
            name: 'StoreAudit',
            icon: 'shop',
            authority: ['店铺审核'],
            routes: [
              {
                path: '/StoreAudit/list',
                name: 'index',
                component: './StoreAudit'
                // newTab: true,
              },
              {
                path: '/StoreAudit/list/details',
                name: 'details',
                component: './StoreAudit/details',
                hideInMenu: true
              },
              {
                component: './404'
              }
            ]
          },
          {
            path: '/Order',
            name: 'Order',
            icon: 'audit',
            hideInMenu: false,
            authority: ['订单管理'],
            routes: [
              {
                path: '/Order/HomePage',
                component: './Order/HomePage',
                hideInMenu: false,
                name: 'HomePage',
                authority: ['订单列表']
              },

              {
                path: '/Order/Close',
                component: './Order/Close',
                hideInMenu: false,
                name: 'Close',
                authority: ['订单关闭和退货']
              },

              {
                path: '/Order/Expires',
                component: './Order/Expires',
                hideInMenu: false,
                name: 'Expires',
                authority: ['即将到期订单']
              },
              {
                path: '/Order/Expires/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/BeOverdue',
                component: './Order/BeOverdue',
                hideInMenu: false,
                name: 'BeOverdue',
                authority: ['逾期订单']
              },
              {
                path: '/Order/OverdueNoReturn',
                component: './Order/OverdueNoReturn',
                hideInMenu: false,
                name: 'OverdueNoReturn',
                authority: ['到期未归还订单']
              },
              {
                path: '/Order/BuyOut',
                component: './Order/BuyOut',
                hideInMenu: false,
                name: 'BuyOut',
                authority: ['买断订单']
              },

              {
                path: '/Order/RentRenewal',
                component: './Order/RentRenewal',
                hideInMenu: false,
                name: 'RentRenewal',
                authority: ['续租订单']
              },
              {
                path: '/Order/RentRenewal/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/HomePage/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/BeOverdue/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/OverdueNoReturn/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/Close/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/Purchase/PurchaseDetails',
                component: './Order/PurchaseDetails',
                hideInMenu: true,
                name: 'Details'
              },

              {
                path: '/Order/BuyOut/BuyOutDetails',
                component: './Order/BuyOutDetails',
                hideInMenu: true,
                name: 'BuyOutDetails'
              },

              {
                path: '/Order/Online',
                component: './Order/Online',
                hideInMenu: false,
                name: 'Online',
                authority: ['电审订单']
              },
              {
                path: '/Order/Online/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/Purchase',
                component: './Order/Purchase',
                hideInMenu: false,
                name: 'Purchase',
                authority: ['电审订单']
              },

              {
                component: './404'
              }
            ]
          },

          // {
          //   path: '/Marketing',
          //   name: 'Marketing',
          //   icon: 'shopping-cart',
          //   authority: ['营销管理'],
          //   hideInMenu: false,
          //   routes: [
          //     {
          //       path: '/Marketing/HomePage',
          //       component: './Marketing/HomePage',
          //       hideInMenu: false,
          //       name: 'HomePage',
          //       authority: ['模块消息'],
          //     },
          //     {
          //       path: '/Marketing/Package',
          //       component: './Marketing/Package',
          //       hideInMenu: false,
          //       name: 'Package',
          //       authority: ['大礼包'],
          //     },
          //     {
          //       path: '/Marketing/Coupon/list',
          //       hideInMenu: false,
          //       name: 'Coupon',
          //       authority: ['优惠券'],
          //       routes: [
          //         {
          //           path: '/Marketing/Coupon/list',
          //           component: './Marketing/Coupon/HomePage',
          //           hideInMenu: true,
          //         },
          //         {
          //           path: '/Marketing/Coupon/list/ToView',
          //           component: './Marketing/Coupon/ToView',
          //           hideInMenu: true,
          //         },
          //         {
          //           path: '/Marketing/Coupon/list/TheEditorList',
          //           component: './Marketing/Coupon/TheEditorList',
          //           hideInMenu: true,
          //         },
          //         {
          //           path: '/Marketing/Coupon/list/add',
          //           component: './Marketing/Coupon/AddList',
          //           hideInMenu: true,
          //         },
          //       ],
          //     },
          //     {
          //       path: '/Marketing/Comment',
          //       component: './Marketing/Comment',
          //       hideInMenu: false,
          //       name: 'Comment',
          //       authority: ['评论管理'],
          //     },
          //     {
          //       path: '/Marketing/Comment/See',
          //       component: './Marketing/Comment/See',
          //       hideInMenu: true,
          //       name: 'See',
          //       authority: ['评论管理'],
          //     },
          //   ],
          // },
          {
            path: '/commission',
            name: 'commission',
            icon: 'shopping',
            authority: ['佣金管理'],
            routes: [
              {
                path: '/commission/list',
                name: 'index',
                component: './Commission'
              },
              {
                path: '/commission/cost',
                name: 'cost',
                component: './Commission/cost'
              },
              {
                path: '/commission/list/add',
                name: 'add',
                component: './Commission/addAndEdit',
                hideInMenu: true
              },
              {
                path: '/commission/list/edit/:id',
                name: 'edit',
                component: './Commission/addAndEdit',
                hideInMenu: true
              },
              {
                path: '/commission/list/commissionDetail/:id',
                name: 'commissionDetail',
                component: './Commission/detail',
                hideInMenu: true
              }
            ]
          },
          {
            path: '/finance',
            name: 'finance',
            icon: 'pay-circle',
            authority: ['财务管理'],
            routes: [
              {
                path: '/finance/audit',
                name: 'audit',
                component: './Finance/audit'
              },
              {
                path: '/finance/bills',
                name: 'bills',
                component: './Finance/bills'
              },
              {
                path: '/finance/audit/:id',
                name: 'audit',
                component: './Commission/detail',
                hideInMenu: true
              },
              {
                path: '/finance/normal',
                name: 'normal',
                component: './Finance/normal',
                authority: ['常规账单']
              },
              {
                path: '/finance/normal/detail/:id',
                name: 'detail',
                component: './Finance/orderDetail',
                hideInMenu: true
              },
              {
                path: '/finance/buyout',
                name: 'buyout',
                component: './Finance/buyout',
                authority: ['买断账单']
              },
              {
                path: '/finance/buyout/detail/:id',
                name: 'detail',
                component: './Finance/buyoutOrderDetail',
                hideInMenu: true
              },
              {
                path: '/finance/purchase',
                name: 'purchase',
                component: './Finance/purchase',
                authority: ['买断账单']
              },
              {
                path: '/finance/purchase/purchaseDetail/:id',
                name: 'purchaseDetail',
                component: './Finance/purchaseDetail',
                hideInMenu: true
              }
            ]
          },
          // 配置管理
          {
            path: '/configure',
            name: 'configure',
            icon: 'setting',
            authority: ['配置管理'],
            routes: [
              {
                path: '/configure/index',
                name: 'index',
                component: './Configure/index',
                authority: ['首页配置']
              },
              {
                path: '/configure/tab',
                name: 'tab',
                component: './Tab/index',
                authority: ['Tab配置']
              },
              // {
              //   path: '/configure/tribe',
              //   name: 'tribe',
              //   component: './Tribe/index',
              //   authority: ['部落配置'],
              // },
              {
                path: '/configure/spike',
                name: 'spike',
                component: './Spike/index',
                authority: ['秒杀配置']
              },

              {
                path: '/configure/spike/topicDetail/:id',
                name: 'topicDetail',
                component: './Spike/TopicDetail',
                hideInMenu: true
              },
              {
                path: '/configure/spike/TopicDetailCopy/:id',
                name: 'topicDetail',
                component: './Spike/TopicDetailCopy',
                hideInMenu: true
              },

              {
                path: '/configure/spike/spikeDetail/:id',
                name: 'SpikeDetail',
                component: './Spike/SpikeDetail',
                hideInMenu: true
              },
              {
                path: '/configure/tribe/publish',
                name: 'publish',
                component: './Tribe/publish',
                hideInMenu: true
              },
              {
                path: '/configure/tribe/edit/:id',
                name: 'tribe-edit',
                component: './Tribe/publish',
                hideInMenu: true
              },
              {
                path: '/configure/category/index',
                name: 'category',
                component: './Category/index',
                authority: ['分类配置']
              },

              {
                path: '/configure/my/index',
                name: 'my',
                component: './My/index',
                authority: ['我的配置']
              },
              {
                path: '/configure/Notice/index',
                name: 'Notice',
                component: './Notice/index',
                authority: ['公告配置']
              },
              {
                path: '/configure/platform',
                name: 'platform',
                component: './Platform/index',
                authority: ['平台配置']
              },
              // Activity
              // {
              //   path: '/configure/Activity/index',
              //   name: 'Activity',
              //   component: './Activity/index',
              // },
              {
                path: '/configure/Activity/edit/:id',
                name: 'Apublish',
                component: './Activity/publish',
                hideInMenu: true
              },
              {
                path: '/configure/Activity/index/publish',
                name: 'Apublish',
                component: './Activity/publish',
                hideInMenu: true
              },
              // {
              //   path: '/configure/ActivityMaterials/index',
              //   name: 'ActivityMaterials',
              //   component: './ActivityMaterials/index',
              // },
              {
                // path: '/configure/abilityCenter',
                name: 'abilityCenter',
                routes: [
                  {
                    path: '/configure/abilityCenter/secondHand',
                    name: 'secondHand',
                    component: './Configure/AbilityCenter/SecondHand/index',
                    authority: ['二手购买配置']
                  },
                  {
                    path: '/configure/abilityCenter/newPhone',
                    name: 'newPhone',
                    component: './Configure/AbilityCenter/SecondHand/index',
                    authority: ['新机购买配置']
                  },
                  {
                    path: '/configure/abilityCenter/tribe',
                    name: 'tribe',
                    component: './Tribe/index',
                    authority: ['部落配置']
                  }
                ]
              }
            ]
          },
          // 报表查询
          {
            path: '/reportTable',
            name: 'reportTable',
            icon: 'table',
            authority: ['报表查询'],
            routes: [
              // {
              //   path: '/reportTable/index',
              //   name: 'index',
              //   component: './ReportTable',
              // },
              {
                path: '/reportTable/source',
                name: 'source',
                component: './ReportTable/Source/index'
              }
            ]
          },

          // {
          //   path: '/Motion',
          //   name: 'Motion',
          //   icon: 'bar-chart',
          //   authority: ['配置管理'],
          //   routes: [
          //     {
          //       path: '/Motion/RollUp',
          //       name: 'RollUp',
          //       component: './Motion/RollUp',
          //       authority: ['首页配置'],
          //     },
          //     {
          //       path: '/Motion/RollUp/RollUpDetails',
          //       name: 'RollUpDetails',
          //       hideInMenu: true,
          //       component: './Motion/RollUpDetails',
          //       authority: ['首页配置'],
          //     },
          //     {
          //       path: '/Motion/RollUp/add',
          //       name: 'add',
          //       hideInMenu: true,
          //       component: './Motion/RollUpDetails',
          //       authority: ['首页配置'],
          //     },
          //     {
          //       path: '/Motion/Order',
          //       name: 'Order',
          //       component: './Motion/Order',
          //     },
          //     {
          //       path: '/Motion/Order/OrderDetails',
          //       name: 'OrderDetails',
          //       hideInMenu: true,
          //       component: './Motion/OrderDetails',
          //     },
          //     // {
          //     //   path: '/Motion/DataView',
          //     //   name: 'DataView',
          //     //   component: './Motion/DataView',
          //     // },
          //   ],
          // },
          {
            path: '/permission',
            name: 'permission',
            icon: 'tool',
            authority: ['权限管理'],
            routes: [
              {
                path: '/permission/index',
                name: 'index',
                component: './Permission/index',
                authority: ['部门列表']
              },
              {
                path: '/permission/index/config/:id',
                name: 'config',
                component: './Permission/PermissionConfig',
                hideInMenu: true
              },
              {
                path: '/permission/member',
                name: 'member',
                component: './Member/index',
                authority: ['成员管理']
              },
              {
                path: '/permission/member/config/:id',
                name: 'config',
                component: './Permission/PermissionConfig',
                hideInMenu: true
              },
              {
                path: '/permission/changepw',
                name: 'changepw',
                component: './user/ChangePw',
                authority: ['权限管理']
              }
            ]
          },

          {
            component: './404'
          }
        ]
      },
      {
        component: './404'
      }
    ]
  },
  {
    component: './404'
  }
]
